<?php

namespace app\api\controller;

use app\admin\model\Config;
use app\admin\model\Notice;
use app\admin\model\Paper;
use app\api\model\Book as BookModel;
use app\BaseController;

class Info extends BaseController
{

    /* 添加 */
    public function getNotice()
    {
        $result = Notice::order('id desc')->select();
        return show(config('status.success'), 'success', $result);
    }

    public function getContent()
    {
        $result = [
            'about' => Config::where('key', 'about')->value('value'),
            'file_ext' => Config::where('key', 'file_ext')->value('value'),
            'file_size' => Config::where('key', 'file_size')->value('value'),
            'sm_share_title' => Config::where('key', 'file_size')->value('value'),
            'sm_share_pic' => Config::where('key', 'file_size')->value('value'),
        ];

        return show(config('status.success'), 'success', $result);
    }
}
